import request from '@/utils/request'

// 查询企业列表
export function listEnterprise(query) {
  return request({
    url: '/business/enterprise/list',
    method: 'get',
    params: query
  })
}

// 查询企业详细
export function getEnterprise(enteId) {
  return request({
    url: '/business/enterprise/' + enteId,
    method: 'get'
  })
}

// 新增企业
export function addEnterprise(data) {
  return request({
    url: '/business/enterprise',
    method: 'post',
    data: data
  })
}

// 修改企业
export function updateEnterprise(data) {
  return request({
    url: '/business/enterprise',
    method: 'put',
    data: data
  })
}

// 提交企业供审批
export function submitEnterprise(enteId) {
  return request({
    url: '/business/enterprise/submit/' + enteId,
    method: 'delete'
  })
}

// 审批通过企业
export function passEnterprise(enteId) {
  return request({
    url: '/business/enterprise/pass/' + enteId,
    method: 'delete'
  })
}

// 反审批退回企业
export function backEnterprise(enteId) {
  return request({
    url: '/business/enterprise/back/' + enteId,
    method: 'delete'
  })
}

// 删除企业
export function delEnterprise(enteId) {
  return request({
    url: '/business/enterprise/' + enteId,
    method: 'delete'
  })
}

// 导出企业
export function exportEnterprise(query) {
  return request({
    url: '/business/enterprise/export',
    method: 'get',
    params: query
  })
}
